#ifndef UTILITY_CHRONO_H
#define UTILITY_CHRONO_H

#include <chrono>
#include <cinttypes>
#include <functional>
#include <string>

namespace Utility {

using clock = std::chrono::system_clock;
using ClockCntType = clock::rep;
using timepoint = clock::time_point;
using duration = clock::duration;
constexpr auto COUNT_PER_SEC = clock::period::den;

#define PRI_CLOCK_CNT PRId64

bool is_valid(timepoint t);
timepoint now();
ClockCntType count(duration td);
ClockCntType epoch_count(timepoint t);
std::string to_string(timepoint t);
std::string to_formatted_string(timepoint t);
double cast_second(duration td);
duration cast_duration(double sec);


}

#endif